<?php
if(!defined('IN_KKFRAME')) exit();

function default_template($file){
	$path = ROOT."template/default/{$file}.php";
	if(file_exists($path)) return $path;
	error::system_error("Missing template 'template/default/{$file}.php'.");
}
function cpheader(){
	global $_K, $formhash;
	echo <<<EOF
<!DOCTYPE html>
<html>
<head>
<title>{$_K[config][main][sitename]} - 系统设置</title>
<meta http-equiv="Content-Type" content="text/HTML; charset=utf-8">
<meta name="author" content="kookxiang" />
<meta name="copyright" content="KK's Laboratory" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="stylesheet" href="template/default/style/style.css" type="text/css" />
<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<div class="header-bar">
<div class="header content clearfix">
<a id="hreder-link" href="./" rel="index" title="{$_K[config][main][sitename]}">
<img class="logo" src="template/default/style/logo.png" alt="{$_K[config][main][sitename]}">
</a>
<span id="link-signup" class="signup">
<b>{$_K[member][username]}</b> <a href="./">返回前台</a> (<a href="member.php?logout={$formhash}">退出</a>)</span>
</div>
</div>

<ul class="nav">
<li class="home"><a href="./">{$_K[config][main][sitename]}</a></li>
<li><a href="admin.php">系统设置</a></li>
</ul>
<div class="main content clearfix">
EOF;
}
function cpfooter(){
	global $_K;
	$debug = DEBUG::output();
	echo <<<EOF
</div>
<div class="footer-bar">
<div class="footer content clearfix">
<ul>
<li>Powered by <a href="http://www.kookxiang.com" target="_blank">KKBBS V1.0</a></li>
<li>{$debug}</li>
</ul>
</div>
</div>
</div>
<div id="footerjs">{$_K[footer_js]}</div>
</body>
</html>
EOF;
}